<template>
  <div>
    <h4>附件列表</h4>
    <el-button type="primary" @click="$router.back(-1)" class="backBtn"
      >返回</el-button
    >
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="url" label="下载地址"> </el-table-column>
      <el-table-column prop="name" label="文件名称"> </el-table-column>
    </el-table>
  </div>
</template>
<script>
export default {
  data() {
    return {
      tableData: [],
      tableList: [],
      obj: {
        url: "",
        name: "",
      },
    };
  },
  components: {},
  created() {
    const file = this.$route.query.info.a_s_annexList;
    this.tableList = file.split("$$");
    console.log(this.tableList);
    for (let i = 0; i < this.tableList.length; i++) {
      this.obj.name = this.tableList[i];
      this.obj.url = "api" + this.tableList[i];
      this.tableData.push(this.obj);
    }
  },
};
</script>

<style>
</style>



